package api

import (
	"sieve_admin_server_userpass/pkg/json"
)

func GOTPGetSecret(uids []int) (map[int]string, error) {
	j, err := json.Marshal(uids)
	if err != nil {
		return nil, err
	}
	ret, err := reqApi("gotp_get_secret", map[string]string{
		"uids": string(j),
	})
	if err != nil {
		return nil, err
	}
	m := map[int]string{}
	if err = json.Unmarshal(ret, &m); err != nil {
		return nil, err
	}
	return m, nil
}
